import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
// Vue.config.productionTip = false
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'

import '@/styles/index.scss' // global css

import App from './App'
import router from './router/routers'
import permission from './components/permission'
import store from './store'

import '@/icons' // icon
import './router/index' // permission control
import VDistpicker from 'v-distpicker'
import VeeValidate from 'vee-validate'
import echarts from 'echarts'
import vSelectPage from 'v-selectpage'
Vue.use(vSelectPage)
Vue.prototype.$echarts = echarts

const config = {
    errorBagName: 'errorBags', // change if property conflicts.
    fieldsBagName: 'fieldBags',
};
Vue.use(VeeValidate,config)
Vue.component('v-distpicker', VDistpicker)
Vue.use(mavonEditor)
Vue.use(Antd)
Vue.use(permission)
Vue.use(ElementUI, {
  locale
})
Vue.config.productionTip = false
require('babel-polyfill')

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
